#ifndef FREEWAYARG_H_INCLUDED
#define FREEWAYARG_H_INCLUDED
#include <unistd.h>
#include "../public/public0.h"
#include<string>
#include<map>
#include <iostream>

using namespace std;

class FreeWayArg{

public:
    static FreeWayArg & getInstance(){
        if(farg == NULL){
            farg = new FreeWayArg();

        }
        return *farg;
    }

    void init(){
      //  cout << "freeway arg init" << endl;
        configmap = freeway_getmap_from_brain(NULL);

        //for(map<string,string>::iterator itr = configmap.begin(); itr != configmap.end(); ++itr)
        //{
          //  cout << itr->second << endl;
        //}

    }

    string getValue(string key)
    {
        map<string,string>::iterator itr = configmap.begin();
        itr = configmap.find(key);

        return itr->second;


    }

private:

    FreeWayArg(){


    }

    static FreeWayArg * farg;

    map<string,string> configmap;
};


FreeWayArg* FreeWayArg::farg = NULL;

#endif // FREEWAYARG_H_INCLUDED
